<!--suppress HtmlUnknownAttribute -->
<template>
  <view class="notice">
    <uni-notice-bar :single="false" :text="message"></uni-notice-bar>
  </view>
  <view class="swiper">
    <swiper autoplay="true">
      <swiper-item>
        <image src="../../static/1.png" style="height: 100%;width: 100%;"></image>
      </swiper-item>
      <swiper-item>
        <image src="../../static/2.png" style="height: 100%;width: 100%;"></image>
      </swiper-item>
      <swiper-item>
        <image src="../../static/3.png" style="height: 100%;width: 100%;"></image>
      </swiper-item>
    </swiper>
  </view>
  <view>
    <rich-text :nodes="nodes"></rich-text>
    <view style="display: flex; flex-direction: column;">
      <view style="display: flex; flex-direction: row; justify-content: space-around;">
        <view style="display: flex; flex-direction: row; justify-content: space-around;">
          <icon size="20" type="waiting"/>
          <text>预约记录</text>
        </view>
        <view style="display: flex; flex-direction: row; justify-content: space-around;">
          <icon size="20" type="warn"/>
          <text>违约记录</text>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
import {getLastNotice} from "@/api/notice";

export default {
  data() {
    return {
      nodes: [{
        name: 'b',
        attrs: {
          style: "line-height: 36px"
        },
        children: [{
          type: 'text',
          text: '预约记录'
        }]
      }],
      message: "测试"
    }
  },created() {
    getLastNotice().then(res => {
      this.message = res.data.noticeContent.replace("<p>", "").replace("</p>", "")
    })
  },
  methods: {}
}
</script>

<style>


</style>
